<?php
/**
 * Created by PhpStorm.
 * User: 陈艺赫
 * Date: 2017/12/6
 * Time: 0:13
 */

namespace Admin\Controller;
use Think\Controller;

class BaseController extends Controller
{
    function __construct()
    {
        parent::__construct();
        $user = session('user');
        if (empty($user)){
            echo "<script>top.location.href='".U('Login/index')."'</script>";
            exit;
        }
    }

}